#!/usr/bin/env python
# coding=utf-8
#__author__ = 'Yunchao Ling'

import os

ht={}

filelist=os.listdir(os.getcwd())
for file in filelist:
    if file.endswith("maxlength"):
        openfile=open(file,"r")
        line=openfile.readline()
        openfile.close()
        line=line[1:-1]
        splitline=line.split(",")
        for item in splitline:
            name=item.split(":")[0]
            value=item.split(":")[1]
            name=name.strip(" ")
            value=value.strip(" ")
            count=int(value)
            name=name[1:-1]
            if ht.has_key(name):
                if count>ht[name]:
                    ht[name]=count
            else:
                ht[name]=count

print(str(ht))







